
using System.Collections;
using System.Collections.Generic;
using System.Data;
using AppGameState;
using UnityEngine;
using AppTableUtils;

using UnityEngine.Networking;


public enum StatisticTypeEnum
{
    total_refresh_times, // 总刷新次数
    manual_refresh_times, // 刷新次数
    add_atk_buff_times,  // 增加攻击力次数
    add_def_buff_times,  // 增加防御力次数
    add_hp_buff_times,  // 增加生命值次数
    killed_enemy_times,  // 击杀敌人次数
    killed_enemy_count,  // 击杀敌人数量
    be_kill_soldiers,  // 被击杀次数
}

public class StatisticManager : MonoBehaviour
{
    public static StatisticManager instance;

    // [HideInInspector] public bool is_ready = false;

    void Awake()
    {
        if (instance != null)
            Destroy(this);
        instance = this;
    }
    
    public Dictionary<StatisticTypeEnum, int> statistic_dc = new Dictionary<StatisticTypeEnum, int>();

    public void add_statistic_value(StatisticTypeEnum key, int delta=1)
    {
        if (statistic_dc.ContainsKey(key))
        {
            statistic_dc[key] += delta;
        }
        else
        {
            statistic_dc.Add(key, delta);
        }
    }

}
